package com.solomiao.demo.multi.thread.demo6;

import java.util.concurrent.ExecutorService;
import java.util.concurrent.Executors;

/**
 * @desc 使用Executors.newXXXXX创建线程池
 * */
public class MainDemo6 {

    public static void main(String[] args) {
        ExecutorService executorService = Executors.newFixedThreadPool(2);

        executorService.submit(new Thread(new ThreadImplementDemo6()));

        executorService.submit(new Thread(new ThreadImplementDemo61()));

        executorService.shutdown(); // 关闭线程池
    }


}
